/* 管理员界面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.sidebar-header img {
    height: 50px;
    width: auto;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: bold;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: rgba(255,255,255,0.2);
    border-left: 4px solid white;
}

.nav-icon {
    font-size: 1.3rem;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.back-home {
    display: block;
    color: white;
    text-decoration: none;
    padding: 12px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.back-home:hover {
    background: rgba(255,255,255,0.2);
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部栏 */
.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

.top-bar-right {
    color: #666;
}

.user-info strong {
    color: #667eea;
}

/* 内容区域 */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

/* 图表区域 */
.chart-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.chart-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.chart-section h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.chart-section h2 svg {
    color: #667eea;
}

.activity-count {
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.activity-list {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.activity-item {
    padding: 20px;
    min-height: 90px;
    background: #f8f9fd;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(102, 126, 234, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.activity-item:hover::before {
    opacity: 1;
}

.activity-item.activity-user {
    border-left-color: #667eea;
}

.activity-item.activity-quiz {
    border-left-color: #4caf50;
}

.activity-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.activity-user .activity-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.activity-quiz .activity-icon {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.activity-default .activity-icon {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(158, 158, 158, 0.3);
}

.activity-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.activity-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.activity-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.activity-time svg {
    opacity: 0.6;
}

.activity-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.6;
}

.activity-user {
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: fit-content;
    word-break: break-word;
}

.activity-action {
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-score {
    margin-left: auto;
    padding: 4px 12px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.activity-score strong {
    font-size: 16px;
    font-weight: 700;
}

/* 表格 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #2c3e50;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.no-data, .loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 按钮样式 */
.btn-view {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 统计框 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.stat-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.stat-box h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item .stat-label {
    color: #666;
}

.stat-item .stat-value {
    font-weight: 600;
    color: #2c3e50;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2,
    .nav-text,
    .back-home span {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 15px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box input {
        min-width: 100%;
    }
}


/* 题目管理样式 */
.btn-add {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

/* 添加题目表单 */
.add-question-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.add-question-form h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-submit,
.btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* 题目表格特殊样式 */
.question-title {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.difficulty-easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.difficulty-medium {
    background: #fff3e0;
    color: #e65100;
}

.difficulty-hard {
    background: #ffebee;
    color: #c62828;
}

.correct-answer {
    color: #4caf50;
    font-size: 16px;
}

.btn-delete {
    background: #ff5252;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.btn-delete:active {
    transform: translateY(0);
}

/* 批量导入样式 */
.page-header-actions {
    display: flex;
    gap: 15px;
}

.btn-batch {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-batch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.3);
}

.batch-import-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.batch-import-panel h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
}

.import-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

.import-tab-content {
    display: none;
}

.import-tab-content.active {
    display: block;
}

.import-hint {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.import-hint p {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.import-hint ul {
    margin: 10px 0;
    padding-left: 25px;
}

.import-hint li {
    color: #666;
    margin: 8px 0;
    line-height: 1.6;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-top: 10px;
}

.btn-link:hover {
    color: #5568d3;
}

.btn-download {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.file-info {
    margin-top: 15px;
    padding: 15px;
    background: #f0f7ff;
    border-radius: 6px;
}

.file-info p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

#jsonInput {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

#jsonFile {
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

#jsonFile:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

/* 进度弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 当模态框显示时，确保使用flex布局进行居中 */
.modal[style*="block"],
.modal[style*="flex"] {
    display: flex !important;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    text-align: center;
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.progress-info p {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
}

/* 响应式 - 批量导入 */
@media (max-width: 768px) {
    .page-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-add,
    .btn-batch {
        width: 100%;
    }
    
    .import-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: left;
    }
}

/* 筛选面板 */
.filters-panel {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-filter,
.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    background: #f0f0f0;
    color: #666;
}

.btn-reset:hover {
    background: #e0e0e0;
}

.filter-stats {
    margin-left: auto;
    color: #666;
    font-size: 14px;
}

.filter-stats strong {
    color: #667eea;
    font-size: 18px;
}

/* 题目详情弹窗 - 重新设计 */
#questionDetailModal {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

/* 元信息 */
.question-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e9f0 100%);
    border-radius: 50px;
    font-size: 14px;
}

.meta-icon {
    font-size: 18px;
}

.meta-label {
    color: #666;
    font-weight: 500;
}

.meta-value {
    color: #333;
    font-weight: 600;
}

/* 题目块 */
.question-block {
    margin-bottom: 25px;
}

.block-title {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.block-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 2px;
}

.question-text {
    background: #f8f9fd;
    padding: 20px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    border: 2px solid #e3e9f0;
}

/* 选项容器 */
.options-container {
    display: grid;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e3e9f0;
    border-radius: 12px;
    transition: all 0.3s;
}

.option-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
}

.option-item.correct-option {
    background: linear-gradient(135deg, #d4f4dd 0%, #e8f8ed 100%);
    border: 2px solid #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.option-label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.correct-option .option-label {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.option-text {
    flex: 1;
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
}

/* 答案显示 */
.answer-block {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #4caf50;
}

.answer-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 解析块 */
.explanation-block {
    background: linear-gradient(135deg, #fff8e1 0%, #fffbf0 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #ffc107;
}

.explanation-text {
    color: #5d4037;
    font-size: 15px;
    line-height: 1.8;
}

/* 弹窗底部 */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e3e9f0;
    display: flex;
    justify-content: flex-end;
    background: #f8f9fd;
}

.btn-modal-close {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 图片上传区域 */
.image-upload-area {
    margin-top: 10px;
}

.btn-upload-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-upload-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.image-upload-area-small {
    margin-top: 8px;
}

.btn-upload-small {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-upload-small:hover {
    transform: scale(1.05);
}

.image-preview,
.image-preview-small {
    margin-top: 10px;
    display: none;
}

.image-preview.active,
.image-preview-small.active {
    display: block;
}

.image-preview-container {
    position: relative;
    display: inline-block;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview-small img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-delete-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-delete-image:hover {
    background: rgba(244, 67, 54, 1);
    transform: scale(1.1);
}

.loading-text {
    padding: 10px;
    text-align: center;
    color: #667eea;
    font-size: 14px;
}

/* 响应式 - 弹窗 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .question-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .meta-item {
        width: 100%;
    }
    
    .block-title {
        font-size: 15px;
    }
    
    .question-text {
        font-size: 15px;
        padding: 16px;
    }
    
    .option-item {
        padding: 12px 16px;
    }
    
    .option-label {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .answer-badge {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
    }
    
    .btn-modal-close {
        width: 100%;
        padding: 14px;
    }
}

/* 响应式 - 筛选和详情 */
@media (max-width: 768px) {
    .filters-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-stats {
        margin-left: 0;
        text-align: center;
    }
    
    .modal-large {
        max-width: 95%;
        padding: 20px;
    }
    
    .option-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* 最近活动响应式 */
    .activity-item {
        padding: 16px;
        min-height: 100px;
    }
    
    .activity-icon {
        width: 40px;
        height: 40px;
    }
    
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .activity-body {
        font-size: 13px;
        gap: 6px;
    }
    
    .activity-user {
        font-size: 14px;
    }
    
    .activity-score {
        margin-left: 0;
        margin-top: 4px;
    }
    
    .activity-list {
        gap: 12px;
    }
}

/* 题目类型标签样式 */
.question-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 50px;
}

.type-choice {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.type-fill {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

/* 填空题专用答案区域样式 */
.fill-in-answer-section {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fff4 100%);
    border: 2px solid #20c997;
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 4px 20px rgba(32, 201, 151, 0.1);
}

.fill-in-main-answer {
    margin-bottom: 20px;
}

.fill-in-answer-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #0d5f3c;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fill-in-answer-content {
    background: #ffffff;
    border: 2px solid #20c997;
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    color: #0d5f3c;
    min-height: 24px;
    word-break: break-all;
    box-shadow: inset 0 2px 4px rgba(32, 201, 151, 0.1);
    transition: all 0.3s ease;
}

.fill-in-answer-content:hover {
    box-shadow: inset 0 2px 4px rgba(32, 201, 151, 0.2), 0 0 0 3px rgba(32, 201, 151, 0.1);
}

.fill-in-keywords-section {
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(32, 201, 151, 0.2);
}

.fill-in-keywords-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fill-in-keywords-content {
    background: #e7f3ff;
    border: 1px solid #0084ff;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    color: #0056b3;
    word-break: break-all;
    line-height: 1.5;
}

.fill-in-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #856404;
    margin-top: 16px;
}

.note-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fill-in-answer-section {
        padding: 16px;
        margin-top: 12px;
    }
    
    .fill-in-answer-content {
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .fill-in-keywords-content {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .fill-in-note {
        font-size: 12px;
        padding: 10px 12px;
    }
}